package ae.pcfc.etks.online.common.domain;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
/**
 * ClientSRoleReq entity. @author Mohtisham.Salahria
 */
@Entity
@Table(name = "T_ETKS_CLIENT_ROLE_REQ", schema = "ETKS_ONLINE_DBA")

@SequenceGenerator(name = "SQ_ETKS_CR_REQ", sequenceName = "SQ_ETKS_CR_REQ", initialValue = 1, allocationSize = 1)
public class ClientRoleReq implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	private Long crReqId;
	private Client Client;
	private Long roleId;
	private String applicationId;

	/**
	 * @return the crReqId
	 */
	@Id
	@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SQ_ETKS_CR_REQ")
	@Column(name = "CR_REQ_ID", nullable = false, precision = 11, scale = 0)
	public Long getCrReqId() {
		return crReqId;
	}

	/**
	 * @param crReqId
	 *            the crReqId to set
	 */
	public void setCrReqId(Long crReqId) {
		this.crReqId = crReqId;
	}

	/**
	 * @return the client
	 */
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "CLIENT_ID")
	public Client getClient() {
		return Client;
	}

	/**
	 * @param client
	 *            the client to set
	 */
	public void setClient(Client client) {
		Client = client;
	}

	/**
	 * @return the roleId
	 */
	@Column(name = "ROLE_ID", nullable = false, precision = 11, scale = 0)
	public Long getRoleId() {
		return roleId;
	}

	/**
	 * @param roleId
	 *            the roleId to set
	 */
	public void setRoleId(Long roleId) {
		this.roleId = roleId;
	}

	@Column(name = "APPLICATION_ID", nullable = false, length = 2000)
	public String getApplicationId() {
		return applicationId;
	}

	public void setApplicationId(String applicationId) {
		this.applicationId = applicationId;
	}

}
